<form style="margin-left: -20px;" class="form-horizontal" name="cfgQueryForm">
    <div class="form-group">
        <div class="col-md-4">
            <span class="col-sm-4 control-label">CfgKey:</span>
            <div class="col-sm-8">
                <input type="text" class="form-control" placeholder="{{ 'cfgMgr.configKey' | translate}}" ng-model="cfgQuery.cfgKey" maxlength="40">
            </div>
        </div>
        <div class="col-md-4">
            <span class="col-md-4 control-label">Value:</span>
            <div class="col-md-8">
                <input type="text" class="form-control" placeholder="{{'cfgMgr.filterString' | translate}}" ng-model="cfgQuery.value" maxlength="40">
            </div>
        </div>
        <div class="col-md-4">
            <span class="col-md-4 control-label">Type</span>
            <div id="code" class="btn-group col-md-8" uib-dropdown is-open="cfgTypesDropdown.isOpen">
                <button type="button" class="btn btn-primary" uib-dropdown-toggle>
                    <span ng-bind="cfgTypesDropdown.option.code"></span>
                    <span class="caret"></span>
                </button>
                <ul uib-dropdown-menu role="menu" aria-labelledby="single-button">
                    <li ng-repeat="it in cfgTypesDropdown.items">
                        <a ng-click="cfgTypesDropdown.selectOption(it)" ng-bind="it.code"></a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</form>

<div class="panel-body pull-right">
    <a class="btn btn-info" ng-click="launch('add')" role="button">{{'cfgMgr.addConfig'| translate}}</a>
    <button class="btn btn-info" ng-click="queryConfig()">{{'dialog.query' | translate}}</button>
</div>

<div>
    <table class="text-left table grey-border table-hover vertical-middle">
        <thead class="text-color-c4">
            <tr>
                <th>Key</th>
                <th>Value</th>
                <th>Type</th>
                <th style="text-align: center">{{ 'userMgr.operators' | translate}}</th>
            </tr>
        </thead>
        <tbody class="text-color-c6">
            <tr ng-if="cfgsLoading!=''">
                <td colspan="9" class="tc" ng-bind="cfgsLoading"></td>
            </tr>

            <tr ng-repeat="d in cfgs">
                <td ng-bind="d.cfgKey"></td>
                <td ng-bind="d.value"></td>
                <td ng-bind="d.cfgType"></td>
                <td class="text-color-c9" style="text-align: center">
                    <div class="btn-group">
                        <a ng-if="d.cfgType!='TEXT'" title="{{'cfgMgr.downloadConfig'| translate}}" class="btn btn-info" ng-href="{{download(d)}}"><i class="fa fa-cloud-download"></i></a>
                        <a ng-if="d.cfgType!='TEXT'" title="{{ 'cfgMgr.rewriteConfig'| translate}}" class="btn btn-info file" href="javascript:;"><i class="fa fa-cloud-upload"></i><input type="file" nv-file-select uploader="uploader" options="d"/></a>
                        <a title="{{'cfgMgr.editConfig' | translate}}" class="btn btn-info" ng-click="launch('modify', d)"><i class="fa fa-pencil"></i></a>
                        <a title="{{'cfgMgr.delConfig' | translate}}" class="btn btn-info" ng-click="launch('del', d)"><i class="fa fa-trash"></i></a>
                    </div>
                </td>
            </tr>
        </tbody>
    </table>
</div>